home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Four * Code
- Date: 22 Mar 1996 19:00:11 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4ivpfrINNhum@keats.ugrad.cs.ubc.ca>
- References: <4it4f6$oe4@news1.radix.net>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <4it4f6$oe4@news1.radix.net>, Jim Ward <jfw@radix.net> wrote:
- >When I first started in C, I ran into single *s: char*
- >Then double *s: char** argv
- >and yesterday I ran into a triple *: char*** nmptr;
- >nmptr is an argument for the UNIX function scandir(), and is to be
-
- really? I checked the man page for scandir() both under SunOS 4.1.3 as well as
- HP-UX 9.03. On both systems, the nmptr argument is:
-
- struct dirent **nmptr;
-
- The Linux man page and dirent.h header has it as ***nmptr---probably
- erroneously so.
-
- When you think about it, there is no need for a triple pointer to obtain a
- simple array of malloc'ed structures. You want a pointer to it, and you pass
- the address of this pointer so that it can be modified, hence a pointer to a
- pointer, or **.
- --
-
-